package com.eastfair.venueservice.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.common.dto.AttachmentFileDTO;
import com.eastfair.venueservice.enumeration.ViolationRecordCertificateViolationTypeEnum;
import com.eastfair.venueservice.enumeration.ViolationRecordViolationSourceEnum;
import com.eastfair.venueservice.enumeration.ViolationRecordViolationStatusEnum;
import com.eastfair.venueservice.enumeration.ViolationRecordViolationTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

/**
 * <p>
 * 实体类
 * 违规处罚记录
 * </p>
 *
 * @author dqq
 * @since 2022-12-01
 */
@Data
@ApiModel(value = "ViolationRecordUpdateDTO", description = "违规处罚记录")
public class ViolationRecordDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;
    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;
    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    private Long subsystemId;
    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Long tenantId;
    /**
     * 违规管理编码
     */
    @ApiModelProperty(value = "违规管理编码")
    @Size(max = 255, message = "违规管理编码长度不能超过255")
    private String violationCode;
    /**
     * 处罚状态 #{HAS_EFFECT:已生效;HAS_DEDUCT:已扣除;CANCEL:已撤销}
     */
    @ApiModelProperty(value = "处罚状态 #{HAS_EFFECT:已生效;HAS_DEDUCT:已扣除;CANCEL:已撤销}")
    private ViolationRecordViolationStatusEnum violationStatus;
    /**
     * 处罚类型 #{REFORM:整改;DEDUCT_MONEY:罚款}
     */
    @ApiModelProperty(value = "处罚类型 #{REFORM:整改;DEDUCT_MONEY:罚款}")
    private ViolationRecordViolationTypeEnum violationType;
    /**
     * 布撤展管理记录id
     */
    @ApiModelProperty(value = "布撤展管理记录id")
    private Long arrangeManageId;
    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    private Long exhibitionManageId;
    /**
     * 展馆编码
     */
    @ApiModelProperty(value = "展馆编码")
    @Size(max = 100, message = "展馆编码长度不能超过100")
    private String spaceCode;
    /**
     * 展馆号
     */
    @ApiModelProperty(value = "展馆号")
    @Size(max = 100, message = "展馆号长度不能超过100")
    private String spaceName;
    /**
     * 展位编码
     */
    @ApiModelProperty(value = "展位编码")
    @Size(max = 100, message = "展位编码长度不能超过100")
    private String siteCode;
    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 100, message = "展位号长度不能超过100")
    private String siteName;
    /**
     * 展位类型
     */
    @ApiModelProperty(value = "展位类型")
    @Size(max = 64, message = "展位类型长度不能超过64")
    private String siteType;
    /**
     * 展位面积
     */
    @ApiModelProperty(value = "展位面积")
    private BigDecimal siteArea;
    /**
     * 展商ID
     */
    @ApiModelProperty(value = "展商ID")
    private Long exhibitorId;
    /**
     * 展商名称
     */
    @ApiModelProperty(value = "展商名称")
    @Size(max = 100, message = "展商名称长度不能超过100")
    private String exhibitorName;
    /**
     * 上传附件列表
     */
    @ApiModelProperty(value = "上传附件列表")
    List<AttachmentFileDTO> attachmentFileDTOs;
    /**
     * 违规项目ID
     */
    @ApiModelProperty(value = "违规项目ID")
    private Long violationProjectId;
    /**
     * 扣除分值
     */
    @ApiModelProperty(value = "扣除分值")
    private Integer score;
    /**
     * 被监督者id
     */
    @ApiModelProperty(value = "被监督者id")
    private Long supervisedId;
    /**
     * 被监督者名称(主运,主场，搭建商)
     */
    @ApiModelProperty(value = "被监督者名称(主运,主场，搭建商)")
    @Size(max = 100, message = "被监督者名称(主运,主场，搭建商)长度不能超过100")
    private String supervisedName;

    /**
     * 被监督者类型(主场，主运，搭建商 )
     */
    @ApiModelProperty(value = "被监督者类型(主场，主运，搭建商 )")
    @Size(max = 255, message = "被监督者类型(主场，主运，搭建商 )长度不能超过255")
    private String supervisedType;
    /**
     * 被监督企业统一社会信用代码
     */
    @ApiModelProperty(value = "被监督企业统一社会信用代码")
    @Size(max = 20, message = "被监督企业统一社会信用代码长度不能超过20")
    private String supervisedUscc;
    /**
     * 被监督企业法人姓名
     */
    @ApiModelProperty(value = "被监督企业法人姓名")
    @Size(max = 64, message = "被监督企业法人姓名长度不能超过64")
    private String supervisedLegalName;
    /**
     * 搭建商施工负责人
     */
    @ApiModelProperty(value = "搭建商施工负责人")
    @Size(max = 64, message = "搭建商施工负责人长度不能超过64")
    private String constructionPrincipal;
    /**
     * 搭建商施工负责人联系方式
     */
    @ApiModelProperty(value = "搭建商施工负责人联系方式")
    @Size(max = 64, message = "搭建商施工负责人联系方式长度不能超过64")
    private String principalPhone;
    /**
     * 监督者id(主场，场馆)
     */
    @ApiModelProperty(value = "监督者id(主场，场馆)")
    private Long supervisorId;
    /**
     * 监督企业名称
     */
    @ApiModelProperty(value = "监督企业名称")
    @Size(max = 200, message = "监督企业名称长度不能超过200")
    private String supervisorName;
    /**
     * 监督者类型(主场，场馆)
     */
    @ApiModelProperty(value = "监督者类型(主场，场馆)")
    @Size(max = 255, message = "监督者类型(主场，场馆)长度不能超过255")
    private String supervisorType;
    /**
     * 监督人ID
     */
    @ApiModelProperty(value = "监督人ID")
    private Long supervisorUserId;
    /**
     * 监督人姓名
     */
    @ApiModelProperty(value = "监督人姓名")
    @Size(max = 100, message = "监督人姓名长度不能超过100")
    private String supervisorUserName;
    /**
     * 证件ID
     */
    @ApiModelProperty(value = "证件ID")
    @TableField(value = "certificate_id")
    private Long certificateId;

    /**
     * 证件违规类型 #{PERSON:人证;CAR:车证;NOT_CERTIFICATE:非证件}
     */
    @ApiModelProperty(value = "证件违规类型 #{PERSON:人证;CAR:车证;NOT_CERTIFICATE:非证件}")
    @TableField(value = "certificate_violation_type")
    private ViolationRecordCertificateViolationTypeEnum certificateViolationType;
    /**
     * 处罚原因
     */
    @ApiModelProperty(value = "处罚原因")
    @Size(max = 500, message = "处罚原因长度不能超过500")
    private String punishReason;
    /**
     * 处罚依据
     */
    @ApiModelProperty(value = "处罚依据")
    @Size(max = 500, message = "处罚依据长度不能超过500")
    private String punishBasis;
    /**
     * 处罚结果
     */
    @ApiModelProperty(value = "处罚结果")
    @Size(max = 500, message = "处罚结果长度不能超过500")
    private String punishResult;
    /**
     * 应处罚金额
     */
    @ApiModelProperty(value = "应处罚金额")
    private BigDecimal shouldPunishAmount;
    /**
     * 实际处罚扣款
     */
    @ApiModelProperty(value = "实际处罚扣款")
    private BigDecimal actualPunishAmount;
    /**
     * 罚款扣除时间
     */
    @ApiModelProperty(value = "罚款扣除时间")
    @TableField(value = "punish_amount_time")
    @Excel(name = "罚款扣除时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime punishAmountTime;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 1000, message = "备注长度不能超过1000")
    private String remark;
    /**
     * 违规项目
     */
    @ApiModelProperty(value = "违规项目")
    @Size(max = 100, message = "违规项目长度不能超过100")
    private String violationProject;

    /**
     * 违规来源 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}
     */
    @ApiModelProperty(value = "违规来源 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}")
    @TableField(value = "violation_source")
    private ViolationRecordViolationSourceEnum violationSource;
    /**
     * 上传附件类型
     */
    @ApiModelProperty(value = "上传附件类型")
    private String violationRecordEnum;
    /**
     *附件枚举类型
     */
    @ApiModelProperty(value = "附件枚举类型")
    private String businessType;
    /**
     * 搜索内容
     */
    @ApiModelProperty(value = "搜索内容")
    private String searchContent;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    private String exhibitionManageName;

    /**
     * 支付方式
     */
    @ApiModelProperty(value = "支付方式")
    private String payWay;
    /**
     * 付款方
     */
    @ApiModelProperty(value = "付款方")
    private String payer;
    /**
     * 收款方
     */
    @ApiModelProperty(value = "收款方")
    private String payee;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;
    /**
     * 商户系统标识
     */
    @ApiModelProperty(value = "商户系统标识")
    private String systemCode;
    /**
     * 违规来源列表
     */
    @ApiModelProperty(value = "违规来源列表 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}")
    private List<ViolationRecordViolationSourceEnum> violationSourceList;
    /**
     * 场馆查询关键字
     */
    @ApiModelProperty(value = "场馆查询关键字")
    private String venueKeyword;
}
